:root {
  --bg: #050505;
  --bg-soft: #0f0f0f;
  --text: #f5f5f5;
  --muted: #8f8f8f;
  --border: rgba(255,255,255,0.08);
  --glow: rgba(255,255,255,0.12);
  --transition: 0.5s cubic-bezier(.19,1,.22,1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

.noise,
.scanlines,
.crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.noise {
  background-image:
    url('https://grainy-gradients.vercel.app/noise.svg');
  opacity: .08;
  mix-blend-mode: screen;
  animation: noiseMove .2s infinite;
}

@keyframes noiseMove {
  0% { transform: translate(0,0); }
  25% { transform: translate(-1%, 1%); }
  50% { transform: translate(1%, -1%); }
  100% { transform: translate(0,0); }
}

.scanlines::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.03),
    rgba(255,255,255,.03) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: .2;
}

.crt {
  background:
    radial-gradient(circle at center,
    transparent 0%,
    rgba(0,0,0,.4) 100%);
}

.loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-text {
  font-family: 'Oswald', sans-serif;
  letter-spacing: .4rem;
  animation: flicker 1s infinite alternate;
}


@keyframes flicker {
  0% { opacity: .4; }
  100% { opacity: 1; }
}

.cursor,
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
}

.cursor {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255,255,255,.8);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(2px);
}

.cursor-trail {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,.08);
  filter: blur(10px);
  transform: translate(-50%, -50%);
}

.cursor.active {
  transform: translate(-50%, -50%) scale(1.8);
  mix-blend-mode: difference;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  z-index: 500;
  backdrop-filter: blur(12px);
}

.logo {
  font-family: 'Oswald', sans-serif;
  letter-spacing: .4rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .2rem;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 1px;
  background: #fff;
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8rem 6rem;
  position: relative;
}

.hero-content {
  max-width: 800px;
  z-index: 2;
}

.hero-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3rem;
  margin-bottom: 2rem;
}

.glitch-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(4rem, 10vw, 10rem);
  line-height: .9;
  text-transform: uppercase;
  position: relative;
  letter-spacing: -.1rem;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  opacity: .8;
}

.glitch-title::before {
  transform: translate(-3px, -2px);
  clip-path: inset(0 0 50% 0);
}

.glitch-title::after {
  transform: translate(3px, 2px);
  clip-path: inset(50% 0 0 0);
}

.hero-description {
  margin-top: 2rem;
  max-width: 600px;
  line-height: 1.8;
  color: #bdbdbd;
}

.cta-button {
  margin-top: 3rem;
  display: inline-block;
  border: 1px solid rgba(255,255,255,.2);
  padding: 1rem 2rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: .2rem;
  transition: var(--transition);
}

.cta-button:hover {
  background: #fff;
  color: #000;
}

.profile-container {
  position: relative;
}

.profile-frame {
  width: 350px;
  height: 500px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  position: relative;
}

.profile-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    transparent,
    rgba(255,255,255,.05),
    transparent
  );
  animation: scan 5s linear infinite;
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2);
}

section {
  padding: 10rem 6rem;
  position: relative;
}

.section-header span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3rem;
}

.section-header h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 4rem;
  margin-top: 1rem;
  text-transform: uppercase;
}

.gallery-grid {
  margin-top: 5rem;
  columns: 3 300px;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  display: block;
  filter: grayscale(1) contrast(1.1);
  transition: 1s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: grayscale(1) contrast(1.4);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.05);
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover::after {
  opacity: 1;
}

.timeline {
  margin-top: 5rem;
  border-left: 1px solid rgba(255,255,255,.1);
  padding-left: 3rem;
}

.timeline-item {
  margin-bottom: 5rem;
  position: relative;
}

.timeline-number {
  position: absolute;
  left: -4.3rem;
  top: 0;
  font-family: 'Oswald', sans-serif;
  color: rgba(255,255,255,.2);
}

.timeline-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.timeline-content p {
  color: #c1c1c1;
  max-width: 700px;
  line-height: 1.8;
}

.about-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
}

.large-text {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 2rem;
}

.quote-box {
  border: 1px solid rgba(255,255,255,.08);
  padding: 3rem;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}

.lab-grid {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.lab-card {
  border: 1px solid rgba(255,255,255,.08);
  padding: 3rem;
  min-height: 280px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.lab-card:hover {
  transform: translateY(-10px);
  background: rgba(255,255,255,.03);
}

.lab-card span {
  color: rgba(255,255,255,.2);
  font-size: 4rem;
  font-family: 'Oswald', sans-serif;
}

.lab-card h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.contact-form {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
}

.contact-form input,
.contact-form textarea {
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
  padding: 1.5rem;
  color: #fff;
  font-size: 1rem;
  resize: none;
}

.contact-form textarea {
  min-height: 180px;
}

.contact-form button {
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 1rem;
  cursor: none;
  transition: var(--transition);
}

.contact-form button:hover {
  background: #fff;
  color: #000;
}

.social-links {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
}

.social-links a {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .2rem;
}

.footer {
  padding: 4rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  color: #7f7f7f;
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: 1.4s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media(max-width: 1000px) {

  .hero {
    flex-direction: column;
    justify-content: center;
    gap: 5rem;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 1.5rem;
  }

  section {
    padding: 8rem 2rem;
  }

  .nav-links {
    display: none;
  }
}

.glitch-title {
  display: flex;
  flex-direction: column;
  line-height: .9;
}

.small-title {
  font-size: 4rem;
  letter-spacing: .2rem;
  margin-bottom: 1rem;
  opacity: .9;
}

.glitch-title span {
  display: block;
}

.back-button {
  position: fixed;
  top: 110px;
  left: 40px;

  z-index: 9999;

  color: white;
  text-decoration: none;

  font-size: .85rem;
  letter-spacing: .3rem;
  text-transform: uppercase;

  opacity: .6;
  transition: .4s ease;
}

.back-button:hover {
  opacity: 1;
  transform: translateX(-6px);
}

.back-button {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.08);
  padding: 12px 18px;
  background: rgba(255,255,255,.03);
}
